package com.athena.api.department;

import java.util.List;

import com.athena.dal.entities.Department;
import com.athena.dal.entities.Faculty;
import com.athena.dal.entities.Subject;

/**
 * Base contract for Department Service.
 * 
 * @author Ajit.Kumar1
 *
 */

public interface IDepartmentService {

	/**
	 * Returns the {@link Department} of the {@link Faculty} with specified
	 * facultyId.
	 * 
	 * @param facultyId
	 * @return
	 */
	public Department getDepartmentOfFaculty(int facultyId);
	
	/**
	 * Adds the specified {@link Department}
	 * 
	 * @param newDepartment - {@link Department} to be added.
	 * 
	 */
	public void addDepartment(Department newDepartment);
	
	/**
	 * Removes the {@link Department} with specified Id.
	 * 
	 * If a {@link Department} with the specified doesn't exist it throws
	 * {@link RuntimeException}.
	 * @param departmentId - String Id of the department to be removed.
	 * 
	 */
	public void removeDepartment(String departmentId);
	
	/**
	 * Updates the specified {@link Department}. If {@link Department} doesn't exist
	 * then the department is added.
	 * 
	 * @param department
	 * 
	 */
	public void updateDepartment(Department department);
	
	/**
	 * Returns the {@link Department} with specified Id, If {@link Department} does
	 * not exist then returns null.
	 * 
	 * @param departmentId
	 * @return
	 */
	public Department getDepartmentWithId(String departmentId);
	
	/**
	 * Returns the {@link List} of {@link Faculty} in the {@link Department} with specified Id.
	 * If {@link Department} with specified doesn't exist it returns null.
	 * 
	 * @param departmentId
	 * @return
	 */
	public List<Faculty> getFaculties(String departmentId);
	
	/**
	 * Returns {@link Faculty} object for the HOD of the {@link Department} with specified Id.
	 * If there is no department with specified Id it throws a {@link RuntimeException}.
	 * If there is no HOD defined it returns null.
	 *  
	 * @param departmentId
	 * @return
	 */
	public Faculty getHOD(String departmentId);
	
	/**
	 * 
	 * @return All the departments in the school.
	 * 
	 */
	public List<Department> getAllDepartments();
	
}
